import { useDetail, useList } from "@/hooks";
import { getUserInfoUrl, getUserTypeValue } from "@/command/apiTool";
import { getAction } from "@/command/netTool";
import { ref } from "vue";
import { useRoute } from "vue-router";
export const useRequest = () => {
  const page = ref();
  const route = useRoute();
  const [detailinfo] = useDetail(
    getUserInfoUrl(
      {
        dh: "",
        xh: "/api/H5/richMeansOfAgriculturalProduction/small/getOne",
      },
      {
        id: route.query.id,
      }
    ),
    {
      id: "",
      name: "",
      address: "",
      distance: "",
      entityComment: "",
      path: "",
      title: "",
      workName: "",
      workDay: "",
      workPrice: "",
      userApplyVOList: [],
      content: "",
      richHelpExplains: [],
      userList: [],
    }
  );
  // 智能推荐
  const [suggestList] = useDetail(
    getUserInfoUrl({
      dh: "",
      xh: "/api/H5/richMeansOfAgriculturalProduction/small/queryNum",
    }),
    []
  );
  return {
    detailinfo,
    suggestList,
    page,
  };
};
